<!--
 * @Author: huangximian huangximian@e-ling.com.cn
 * @Date: 2022-05-23 09:04:26
 * @LastEditors: huangximian huangximian@e-ling.com.cn
 * @LastEditTime: 2022-06-06 10:16:27
 * @FilePath: \jcyy-official-website\src\views\computerSide\Home\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="home">
    <Header></Header>
    <!-- <HeaderOther v-if="routerIsShow == 1"></HeaderOther> -->
    <!--路由组件展示的地方-->
    <router-view></router-view>
    <Footer></Footer>
    <!--点击跑到顶部 -->
    <div class="postion_flex" @click="toTop">
      <img src="../../../assets/icon/ico_top.png" alt="" />
    </div>
  </div>
</template>
<script>
//rem PC 端自适应
import "../../../../util/rem";
import Header from "../compents/Header/index";
import Footer from "../compents/Footer/index";
export default {
  name: "home",
  data() {
    return {
      routerIsShow:0
    };
  },
  components: {
    Header,
    Footer,
  },
  mounted(){
    
  },
  methods: {
    toTop() {
      let top = document.documentElement.scrollTop || document.body.scrollTop;
      const timeTop = setInterval(() => {
        document.body.scrollTop =
          document.documentElement.scrollTop =
          top -=
            50;
        if (top <= 0) {
          clearInterval(timeTop);
        }
      }, 10);
    },
  },
};
</script>
<style scoped>
.home {
  /* min-width: 1100px; */
  position: relative;
  /* max-width: 192rem; */
  margin: 0 auto;
}

.postion_flex {
  position: fixed;
  top: 70rem;
  right: 10rem;
  width: 7.2rem;
  height: 7.2rem;
  background: #299399;
  border-radius: 8px 8px 8px 8px;
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.postion_flex img {
  width: 3.2rem;
  height: 3.2rem;
}
</style>